<?php
namespace app\index\controller;
use app\index\model\Index_model;
use think\Controller;
use think\Session;
use think\Db;
header("Content-type: text/html; charset=utf-8");
//首页
class Index extends Common
{

    //备用
    public function indexx()
    {
        Session::get('username');   
        $params = input();

        $notice_add      = new Index_model;
        $notice          = $notice_add->notice_add();            //日志
        $latest_issues   = $notice_add->latest_issues();         //最新问题
        $total           = $notice_add->total();                 //总数
        $unsolved        = $notice_add->unsolved();              //未解决
        $pending         = $notice_add->pending();               //待审核
        $delayed         = $notice_add->delayed();               //已延期
        $closed          = $notice_add->closed();                //已关闭
        $solved          = $notice_add->solved();                //已解决
        $refuse_to       = $notice_add->refuse_to();             //已延期
        $project_member  = $notice_add->project_member();        //已拒绝
        $task            = $notice_add->task();                  //任务
        $defect          = $notice_add->defect();                //缺陷
        $demand          = $notice_add->demand();                //需求
        $anxious         = $notice_add->anxious();               //急
        $high            = $notice_add->high();                  //高
        $in              = $notice_add->in();                    //中
        $low             = $notice_add->low();                   //低


        $this->assign('notice',$notice);                    //日志
        $this->assign('latest_issues',$latest_issues);      //最新问题
        $this->assign('total',$total);                      //总数
        $this->assign('unsolved',$unsolved);                //未解决
        $this->assign('pending',$pending);                  //待审核
        $this->assign('delayed',$delayed);                  //已延期
        $this->assign('closed',$closed);                    //已关闭
        $this->assign('solved',$solved);                    //已解决
        $this->assign('refuse_to',$refuse_to);              //已延期
        $this->assign('project_member',$project_member);    //已拒绝
        $this->assign('task',$task);                        //任务
        $this->assign('defect',$defect);                    //缺陷
        $this->assign('demand',$demand);                    //需求
        $this->assign('anxious',$anxious);                  //急
        $this->assign('high',$high);                        //高
        $this->assign('in',$in);                            //中
        $this->assign('low',$low);                          //低
        return view('indexx');
    }

    // 首页
    public function index()
    {
    	Session::get('username');   
		Session::get('admin');
        $params = input();

        $notice_add = new Index_model;
        $notice     = $notice_add->notice_add();            //日志
        $latest_issues   = $notice_add->latest_issues();         //最新问题
        $total      = $notice_add->total();                 //总数
        $unsolved   = $notice_add->unsolved();              //未解决
        $pending    = $notice_add->pending();               //待审核
        $delayed    = $notice_add->delayed();               //已延期
        $closed     = $notice_add->closed();                //已关闭
        $solved     = $notice_add->solved();                //已解决
        $refuse_to  = $notice_add->refuse_to();             //已延期
        $project_member  = $notice_add->project_member();   //已拒绝
        $task  = $notice_add->task();                       //任务
        $defect  = $notice_add->defect();                   //缺陷
        $demand  = $notice_add->demand();                   //需求
        $anxious  = $notice_add->anxious();                 //急
        $high  = $notice_add->high();                       //高
        $in  = $notice_add->in();                           //中
        $low  = $notice_add->low();                         //低

        $this->assign('notice',$notice);                    //日志
        $this->assign('latest_issues',$latest_issues);      //最新问题
        $this->assign('total',$total);                      //总数
        $this->assign('unsolved',$unsolved);                //未解决
        $this->assign('pending',$pending);                  //待审核
        $this->assign('delayed',$delayed);                  //已延期
        $this->assign('closed',$closed);                    //已关闭
        $this->assign('solved',$solved);                    //已解决
        $this->assign('refuse_to',$refuse_to);              //已延期
        $this->assign('project_member',$project_member);    //已拒绝
        $this->assign('task',$task);                        //任务
        $this->assign('defect',$defect);                    //缺陷
        $this->assign('demand',$demand);                    //需求
        $this->assign('anxious',$anxious);                  //急
        $this->assign('high',$high);                        //高
        $this->assign('in',$in);                            //中
        $this->assign('low',$low);                          //低
        return view('index');
    }
}
